﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<%
    if (Request.IsAuthenticated) {
%>
<% ViewState["nombre_usuario"] = Page.User.Identity.Name ; %>

        Bienvenido <b><%= Html.Encode(Page.User.Identity.Name) %></b> |
        <%= Html.ActionLink("Ver perfil", "Profile", "Account") %> |
        <%= Html.ActionLink("Cerrar sesión", "LogOff", "Account") %> 
<%
    }
    else {
%> 
        <a href="javascript:toggleLoginPanel();" id="LoginButton" class="unselected">Iniciar sesi&#243;n</a> | <%= Html.ActionLink("Regístrate", "Register", "Account") %>
        <div id="LoginPanel" class="hidden">
            <form action="/Account/LogOn" method="post"> 
                <div> 
                        <div class="editor-label"> 
                            <label for="Correo">Correo Electronico</label> 
                        </div> 
                        <div class="editor-field"> 
                            <input id="Correo" name="Correo" type="text" value="" /> 
                    
                        </div> 
                
                        <div class="editor-label"> 
                            <label for="Password">Contrase&#241;a</label> 
                        </div> 
                        <div class="editor-field"> 
                            <input id="Password" name="Password" type="password" /> 
                    
                            <br /> 
                            <a href="/Account/Resetear">Recuperar contrase&#241;a</a> 
                        </div>
                        <input type="hidden" name="returnUrl" value="<%=  Request.Url.ToString() %>" />
                
                              
            
                        <div class="editor-label"> 
                            <input id="RememberMe" name="RememberMe" type="checkbox" value="true" /><input name="RememberMe" type="hidden" value="false" /> 
                            <label for="RememberMe">Recordar sesi&#243;n</label> 
                        </div>  
                
                
 
                        <p> 
                            <input type="submit" value="Iniciar sesión" /> 
                        </p> 
                </div> 
            </form> 
        </div>
<%
    }
%>
